<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:75:"D:\important\netwws-cms\public/../application/admin\view\setting\lists.html";i:1507614517;s:76:"D:\important\netwws-cms\public/../application/admin\view\extends\extend.html";i:1507614517;}*/ ?>
<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <!--bootstarp-->
    <link href="__admin__/css/bootstrap.min.css" rel="stylesheet">
    <!-- 图标-->
    <link href="__admin__/css/font-awesome.min.css" rel="stylesheet">
    <!-- animate -->
    <link href="__admin__/css/animate.min.css" rel="stylesheet">
    <!--自定义css-->
    <link href="__admin__/css/style.min.css" rel="stylesheet">
    
    <!--美化 checkbox radio css-->
    <link href="__admin__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/public/webuploader/webuploader.css" rel="stylesheet">
    <style>
        .litpic_tip{
            line-height: 22px;
            margin: 10px 0;
            padding: 0px 5px;
            font-size: 12px;
            background-color: #b1ebb1;
        .picture_item {
            width: 130px;
            height: 130px;
            border: 1px solid #cccccc;
            padding: 5px;
            float: left;
            position: relative;
            overflow: hidden;
        }
        .picture_item img {
            position: relative;
            z-index: 1;
        }
        .picture_item .picture_del {
            width: 43px;
            height: 20px;
            text-align: center;
            font-size: 12px;
            color: #ffff66;
            cursor: pointer;
            background-color: #ff6600;
            position: absolute;
            z-index: 2;
            right: 5px;
            bottom: 5px;
            display: none;
        }
        .picture_item .picture_go_up {
            width: 40px;
            height: 20px;
            font-size: 12px;
            cursor: pointer;
            background-color: #fff;
            position: absolute;
            z-index: 2;
            left: 5px;
            top: 50%;
            display: none;
        }
    </style>

</head>
<body class="gray-bg">

    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>
                            <i class="glyphicon glyphicon-log-out"></i>
                            网站设置
                        </h5>
                        <div class="ibox-tools">
                            <a href="javascript:location.reload(true);" class="btn btn-outline btn-info btn-xs">
                                <i class="fa fa-refresh"></i> 刷新
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                            <div class="panel blank-panel">
                                <div class="panel-heading" style="position:relative">
                                    <div class="panel-options" >
                                        <ul class="nav nav-tabs">
                                            <?php if(!(empty($config['title']) || (($config['title'] instanceof \think\Collection || $config['title'] instanceof \think\Paginator ) && $config['title']->isEmpty()))): if(is_array($config['title']) || $config['title'] instanceof \think\Collection || $config['title'] instanceof \think\Paginator): $i = 0; $__LIST__ = $config['title'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                                                    <li <?php if($i == '1'): ?>class="active"<?php endif; ?> >
                                                        <a data-toggle="tab" href="#tab-<?php echo $v['groups_id']; ?>" aria-expanded="true">
                                                            <i class="<?php echo $v['icon']; ?>"></i> <?php echo $v['title']; ?>
                                                        </a>
                                                    </li>
                                                <?php endforeach; endif; else: echo "" ;endif; endif; ?>
                                        </ul>
                                    </div>
                                    <ul style="position: absolute;right: 80px;top: 0;list-style: none">
                                        <li>
                                            <div class="btn-group">
                                                <a href="<?php echo url('Setting/configLists'); ?>" class="btn btn-danger batchDelete">
                                                    <i class="glyphicon glyphicon-remove-circle"></i> 配置项
                                                </a>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                                <form method="post" action="" class="form-horizontal" id="checkForm">
                                <div class="panel-body">
                                    <div class="tab-content">

                                            <?php if(!(empty($config['data']) || (($config['data'] instanceof \think\Collection || $config['data'] instanceof \think\Paginator ) && $config['data']->isEmpty()))): if(is_array($config['data']) || $config['data'] instanceof \think\Collection || $config['data'] instanceof \think\Paginator): $i = 0; $__LIST__ = $config['data'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                                                    <div id="tab-<?php echo $key; ?>"  <?php if($i == '1'): ?>class="tab-pane active" <?php else: ?>class="tab-pane"<?php endif; ?> >
                                                        <?php if(is_array($v) || $v instanceof \think\Collection || $v instanceof \think\Paginator): $i = 0; $__LIST__ = $v;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$html): $mod = ($i % 2 );++$i;?>
                                                            <?php echo $html; endforeach; endif; else: echo "" ;endif; ?>
                                                    </div>
                                                <?php endforeach; endif; else: echo "" ;endif; endif; ?>

                                        </div>
                                 </div>
                                 <div class="text-center">
                                     <?php echo token(); ?>
                                     <button type="submit" class="btn btn-primary">保存</button>
                                     <button type="reset" class="btn btn-primary">重置</button>
                                 </div>
                                </form>

                            </div>
                    </div>
                </div>
            </div>

        </div>
    </div>

<!-- jquery-->
<script src="__admin__/js/jquery.min.js"></script>
<!-- bootstarp-->
<script src="__admin__/js/bootstrap.min.js"></script>

    <!--美化 checkbox radio js-->
    <script src="__admin__/js/plugins/iCheck/icheck.min.js"></script>
    <!-- sweetalert js -->
    <script src="__admin__/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script src="/static/public/webuploader/webuploader.js"></script>
    <!-- sweetalert js -->
    <script src="__admin__/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script>
        $(document).ready(function() {
            $(".i-checks").iCheck({
                checkboxClass: "icheckbox_square-green",
                radioClass: "iradio_square-green",
            });
            $('#checkAll').on('ifChecked', function (event) {
                $('.i-checks').iCheck('check');
            });
            $('#checkAll').on('ifUnchecked', function (event) {
                $('.i-checks').iCheck('uncheck');
            });

            var uploader = WebUploader.create({
                auto: true,    // 选完文件后，是否自动上传。
                // 文件接收服务端。
                server: '/admin/files/uploads',
//                pick: {
//                    id:'.uploader',
//                    multiple:false
//                },
                pick: '.uploader',
                resize: false,
                accept: {
                    title: 'Images',
                    extensions: 'jpg,jpeg,png',
//                    mimeTypes: 'image/*'
                    mimeTypes: 'image/jpg,image/jpeg,image/png'
                },
                method:'POST',
                formData:{
                    rule:'img',
                },
                duplicate:true
            });
            // 文件上传成功，给item添加成功class, 用样式标记上传成功。
            uploader.on( 'uploadSuccess', function( file ,response) {
                response = response.file;
                if(response.error){
                    return  swal({title: response.msg, icon: 'warning',dangerMode: true,});
                }
                console.log(file);
                var input    = $('#rt_'+file.source.ruid).parent('.uploader').data('id');
                $(input).val(response.data.save_path);
                swal({title:'上传成功！', icon: 'success',dangerMode: true,})
            });
            // 文件上传失败，显示上传出错。
            uploader.on( 'uploadError', function( file ) {
                swal({title: '上传失败！', icon: 'warning',dangerMode: true,});
            });
        });
    </script>

</body>
</html>
